package cn.itsource.org.mapper;

import cn.itsource.org.domain.Department;
import cn.itsource.org.query.DepartmentQuery;

import java.util.List;

public interface DepartmentMapper {
    /**
     * 保存数据
     * @param department
     */
    void save(Department department);

    /**
     * 修改数据
     * @param department
     */
    void update(Department department);

    /**
     * 删除数据
     * @param id
     */
    void remove(Long id);

    /**
     * 查询一条数据
     * @param id
     * @return
     */
    Department loadById(Long id);

    /**
     * 查询所有数据
     * @return
     */
    List<Department> loadAll();

    /**
     * 查询总条数
     * @param query
     * @return
     */
    Integer queryCount(DepartmentQuery query);

    /**
     * 查询当前页
     * @param query
     * @return
     */
    List<Department> queryData(DepartmentQuery query);

    /**
     * 批量删除
     * @param ids
     */
    void deleteByIds(Long[] ids);
}
